#coding=utf-8
import configparser
import os
import json


class read_ini():
    def open_ini(self,section,option):
        open_ini_file=configparser.ConfigParser()
        # 创建一个对象
        open_ini_file.read(os.path.dirname(__file__)+ "\host_config.ini",encoding="utf-8")
        # 传入文件对象到对象
        if section==None:
            section="server"
        data=open_ini_file.get(section,option)
        return data
        
rf=read_ini()
